From cc248cb6078e151feccf5fbba4d7c4ceee418224 Mon Sep 17 00:00:00 2001 From: "akw27@labyrinth.cl.cam.ac.uk" Date: Fri, 20 Aug 2004 09:01:10 +0000 Subject: [PATCH] bitkeeper revision 1.1159.45.8 (4125bdd65AGH_yEQnU1cGd31tL8SuA) Add a timeout to blkif connect. --- linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c b/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c index e28274a457..7a50b14fb2 100644 --- a/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c +++ b/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c @@ -1215,12 +1215,15 @@ int __init xlblk_init(void) * for notifications before proceeding. For now we assume that we * will be notified of exactly one interface. */ - while ( blkif_state != BLKIF_STATE_CONNECTED ) + for ( i=0; (blkif_state != BLKIF_STATE_CONNECTED) && (i < 10*HZ); i++ ) { set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(1); } + if (blkif_state != BLKIF_STATE_CONNECTED) + printk(KERN_INFO "Timeout connecting block device driver!\n"); + return 0; } -- 2.30.2